<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
	
	<h:head>  
  		<link href="${request.contextPath}/css/estilo.css" rel="stylesheet" type="text/css" />
    </h:head> 
	
<h:body>
<ui:composition template="../WEB-INF/templates/templateMain.xhtml">
	<ui:define name="content">
	
	<p:panel header="Tarefa de Agrupamento">
		
	<h:form>
	<p:dialog id="basicDialog" widgetVar="dlg" header="Visualizar Agrupamento" draggable="false" resizable="false" closeOnEscape="true" modal="true">
		<h:commandButton value="Visualizar agrupamento" action="#{extrairConhecimentoBEAN.prosseguirVisualizar}"/>
	</p:dialog>
	</h:form>
	<h:form>
		<h:commandButton value="Gerar Novo arquivo Weka" action="#{extrairConhecimentoBEAN.escreveArquivo}"/>
		<br></br>
		<br></br>
		<h:outputText value="Número de grupos desejados: "/><h:inputText value="#{extrairConhecimentoBEAN.gruposDesejados}" size="1"/>
		<h:outputText value=" "/>
		<br></br>
		<br></br>
		<h:commandButton value="Realizar agrupamentos" action="#{extrairConhecimentoBEAN.realizarAgrupamentos}"/>
		<br></br>
		<br></br>
		<p:panelGrid columns="1">
		<p:chart type="pie" model="#{extrairConhecimentoBEAN.modeloPizza}" style="width:640px;height:480px">
		        <p:ajax event="itemSelect" listener="#{extrairConhecimentoBEAN.itemSelecionado}" oncomplete="PF('dlg').show();"/>
		</p:chart>
		</p:panelGrid>	
	</h:form>
	</p:panel>

	</ui:define>
</ui:composition>
</h:body>
</html>